﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using SharpDiary.Core.Controls;
using SharpDiary.Core.Attributes;
using SharpDiary.Core.Utility;

namespace SharpDiary.Reminder
{
    [SettingsAttribute("5b08304b-c3ba-4d2f-921b-1989983f0906", "ReminderSettings")]
    public partial class ReminderSettingsControl : SettingsControlBase
    {
        #region Fields & Properties



        #endregion

        #region Constructors

        public ReminderSettingsControl()
        {
            InitializeComponent();
        }

        #endregion

        #region Methods

        public override bool CheckIfInputOk(ref string errorMessage)
        {
            return true;
        }

        public override bool SaveSettingsInfo()
        {
            return UserSettings.GetInstance().CreateOrUpdateSettingValue("ReminderState",
                (chbReminderState.Checked ? 1 : 0));
        }

        public override void LoadSettingsInfo()
        {
            base.LoadSettingsInfo();

            chbReminderState.Checked =
                (Convert.ToInt64(UserSettings.GetInstance().GetSettingValue("ReminderState", "0")) == 1);
        }

        #endregion
    }
}
